/**

This file is part of MaCI/GIMnet.

MaCI/GIMnet is free software: you can redistribute it and/or modify it 
under the terms of the GNU Lesser General Public License as published 
by the Free Software Foundation, either version 3 of the License, or 
(at your option) any later version.

MaCI/GIMnet is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public 
License for more details.

You should have received a copy of the GNU Lesser General Public 
License along with GIMnet. (See COPYING.LESSER) If not, see 
<http://www.gnu.org/licenses/>.

**/
#ifndef OBSTACLE2_H
#define OBSTACLE2_H

#include <libxml/parser.h>
#include <libxml/tree.h>
#include "Object.h"
#include "Shapes.h"

class CObstacle2 : public CObject
{
  public:
    CObstacle2(CWorld* World, float x, float y);
    
    ~CObstacle2();
  
    void Activate();
  
    void Update(float StepSize);
  
    void Draw();
    
    void OnCollision(CPrimitive *primitive, int numc, dContact *contacts, CPrimitive *primitive2);
  
    static CObject* LoadMLMA(CWorld *world, xmlNode *node);
    
    bool collisionColoring;
    
  private:
    
    int numOfCollisions;
    bool colliding;
    TMaterial material;
    CPrimitive *primitive;
    CPrimitive *lastCollider;
};



#endif
